// Depends on tencentcloud-sdk-nodejs version 4.0.3 or higher
const tencentcloud = require("tencentcloud-sdk-nodejs");

const IaiClient = tencentcloud.iai.v20200303.Client;

// 实例化一个认证对象，入参需要传入腾讯云账户secretId，secretKey,此处还需注意密钥对的保密
// 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
const clientConfig = {
    credential: {
        secretId: "AKIDueAQRCZjdIitoUu51hCUYR5UfbHitoTt",
        secretKey: "DArIUR8csuhEZfV6RXNyJOEo8D4h8PTI",
    },
    region: "ap-beijing",
    profile: {
        httpProfile: {
            endpoint: "iai.tencentcloudapi.com",
        },
    },
};

// 实例化要请求产品的client对象,clientProfile是可选的
const client = new IaiClient(clientConfig);
function CompareFace(ImageA, ImageB) {
    const params = {
        ImageA,
        ImageB
    };
    return client.CompareFace(params)
}

module.exports = CompareFace